/*
 * Model3D.h
 */

#ifndef MODEL3D_H_
#define MODEL3D_H_

#include <gl/gl.h>
#include "Vertex.h"


class Model3D {
public:
	Model3D();
	virtual ~Model3D();

	/* Specific to every window create, like texture loading*/
	virtual void initializeGL();

	/* Draw the model */
	virtual void renderGL();

	/* Logic update */
	virtual void update(float miliseconds);

	/* Set global model coordinates */
	void setPosition(float p_X, float p_Y, float p_Z);
	void setRotation(float p_X, float p_Y, float p_Z);

	Vertex getPosition();

	static bool buildTexture(char *szFileName, GLuint &texid);

	float getDiameter();
	void getPosition(float &p_X, float &p_Y, float &p_Z);
	void getPosition(int &x, int &y, int &z);

protected:
	/* Global model coordinates */
	float p_X, p_Y, p_Z;
	float r_X, r_Y, r_Z;
	GLuint *texture;
	float diameter; // diameter of 3D model
};

#endif /* MODEL3D_H_ */
